<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVerifyCodeByPhoneTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		//手机验证码记录表
		Schema::create('verify_code_by_phone',function(Blueprint $table) {
			$table->increments('id')         ->comment('验证码标识');
			$table->string('phone',11)       ->comment('手机号');
			$table->string('verify_code',8)  ->comment('验证码');
			$table->string('ip')             ->comment('请求ip');
			$table->string('ensure_session') ->nullable()  ->comment('请求的session,备用短信快捷登录');
			$table->softDeletes();
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
	}

}
